<?php
/**
* @version		$Id: dogadjaji.php 7 2011-11-01 10:57:19Z netix.mail@gmail.com $
* @package		ALM Hotel Menager	
* @subpackage	com_almhm
* @author		ALM Studio
* @copyright	Copyright 2011 ALM Studio. All rights reserved
* @licence		Commercial
*/

defined('_JEXEC') or die('Restricted access');

jimport('joomla.application.component.modeladmin');

class AlmHmModelDogadjaji extends JModelAdmin
{

	public function getTable($type = 'Dogadjaji', $prefix = 'AlmHmTable', $config = array()) 
	{
		return JTable::getInstance($type, $prefix, $config);
	}


	public function getForm($data = array(), $loadData = true) 
	{
		$form = $this->loadForm('com_almhm.dogadjaji', 'dogadjaji', array('control' => 'jform', 'load_data' => $loadData));
		if (empty($form)) 
		{
			return false;
		}
		return $form;
	}

	protected function loadFormData() 
	{
		$data = JFactory::getApplication()->getUserState('com_almhm.edit.dogadjaji.data', array());
		if (empty($data)) 
		{
			$data = $this->getItem();
		}
		return $data;
	}
}
